1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module soup.SessionFeatureIF;
26 
27 private import soup.Session;
28 private import soup.c.functions;
29 public  import soup.c.types;
30 
31 
32 /**
33  * An object that implement some sort of optional feature for
34  * #SoupSession.
35  *
36  * Since: 2.24
37  */
38 public interface SessionFeatureIF{
39 	/** Get the main Gtk struct */
40 	public SoupSessionFeature* getSessionFeatureStruct(bool transferOwnership = false);
41 
42 	/** the main Gtk struct as a void* */
43 	protected void* getStruct();
44 
45 
46 	/** */
47 	public static GType getType()
48 	{
49 		return soup_session_feature_get_type();
50 	}
51 
52 	/**
53 	 * Adds a "sub-feature" of type @type to the base feature @feature.
54 	 * This is used for features that can be extended with multiple
55 	 * different types. Eg, the authentication manager can be extended
56 	 * with subtypes of #SoupAuth.
57 	 *
58 	 * Params:
59 	 *     type = the #GType of a "sub-feature"
60 	 *
61 	 * Returns: %TRUE if @feature accepted @type as a subfeature.
62 	 *
63 	 * Since: 2.34
64 	 */
65 	public bool addFeature(GType type);
66 
67 	/** */
68 	public void attach(Session session);
69 
70 	/** */
71 	public void detach(Session session);
72 
73 	/**
74 	 * Tests if @feature has a "sub-feature" of type @type. See
75 	 * soup_session_feature_add_feature().
76 	 *
77 	 * Params:
78 	 *     type = the #GType of a "sub-feature"
79 	 *
80 	 * Returns: %TRUE if @feature has a subfeature of type @type
81 	 *
82 	 * Since: 2.34
83 	 */
84 	public bool hasFeature(GType type);
85 
86 	/**
87 	 * Removes the "sub-feature" of type @type from the base feature
88 	 * @feature. See soup_session_feature_add_feature().
89 	 *
90 	 * Params:
91 	 *     type = the #GType of a "sub-feature"
92 	 *
93 	 * Returns: %TRUE if @type was removed from @feature
94 	 *
95 	 * Since: 2.34
96 	 */
97 	public bool removeFeature(GType type);
98 }